package com.yi.student.dto;

import org.konghao.poi.util.ExcelResources;

import com.yi.student.model.Student;

public class ExcelDto {
	
	private String name ;
	private String xh ;
	private String ksh ;
	private String sex ;
	private String status;
	
	@ExcelResources(title="姓名" ,order=1)   //title 所对应的列要与excel 的列的头相同
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@ExcelResources(title="学号" , order=2)
	public String getXh() {
		return xh;
	}

	public void setXh(String xh) {
		this.xh = xh;
	}

	@ExcelResources(title="考试号" ,order=3)
	public String getKsh() {
		return ksh;
	}

	public void setKsh(String ksh) {
		this.ksh = ksh;
	}

	@ExcelResources(title="性别" , order=4)
	public String getSex() {
		return sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@ExcelResources(title="状态" , order=5)
	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Student transStudentExcel(){
		Student stu = new Student();
		
		stu.setKsh(this.getKsh()) ;
		stu.setName(this.getName());
		stu.setSex(this.getSex());
		stu.setXh(this.getXh());
		
				
		if("在校".equals(this.getStatus().trim())){
			stu.setStatus("1");
		}else {
			stu.setStatus("0");
		}	
		return stu;
	}

}
